#ifndef ProgressDialog_H
#define ProgressDialog_H

#include <QDialog>
#include <QCloseEvent>
#include "ui_saving.h"

class ProgressDialog : public QDialog, Ui::saving_dialog
{
    Q_OBJECT
public:
    explicit ProgressDialog(QWidget *parent = 0);

    void setTitle( QString title)     { setWindowTitle(title); }
    void setText( QString text )      { stateLabel->setText(text);}
    void setProgress( int value)      { progress->setValue(value); }
    void setMaxProgress( int max)     { progress->setMaximum(max); }
    void setMaxFullProgress( int max) { fullProgress->setMaximum(max); }
    void incrementProgress()          { progress->setValue( progress->value() + 1);}
    void incrementFullProgress()      { fullProgress->setValue( fullProgress->value() + 1);}

    void hideProgress()     { progress->hide(); }
    void hideFullProgress() { fullProgress->hide(); }

    void showProgress()     { progress->show(); }
    void showFullProgress() { fullProgress->show(); }

    bool progressVisible()  { return progress->isVisible();}

    int getProgress() { return progress->value(); }

    void closeEvent(QCloseEvent *ev) { ev->ignore(); }

    void resetFullProgress() { fullProgress->setValue(0); }
signals:

public slots:

};

#endif // ProgressDialog_H
